third-party-prc-api
Loyalty Get Transaction History
Description: This service is used to get transaction history of a customer.
Channel sends the request to mulesoft. Mulesoft will send the request to Loyalty system and get back the result.
A response is sent back to the channel immediately. If it fails due to any reason, a proper error is sent back to the API consuming channel to both REST using the error codes defined.
Mulesoft Request:
Headers:
Mandatory Headers: x-correlation-id, client_id, client_secret, x-channel-id, x-bank-id
Optional Headers: x-sub-channel-id, x-user-id, x-debug-flag, x-customer-id, Authorization
Paramaters:
URI Params: {id}
Query Params:
pageSize: Mandatory (-1 for unlimited periods)
pageNumber: Mandatory (starts from 1)
sort: Optional (asc,desc)
type: Mandatory (all, gain, redeem, expiry)
Content-type: application/json
Mulesoft Response:
Success Response: (200)
{
"status":
{
"success": true,
"code": "200",
"arabicMessage": "تمت العملية بنجاØ",
"englishMessage": "The Operation has been Successfully Completed"
},
"response": {
"transactions": [
{
"title": "gained",
"type": "gained",
"transaction": [
{
"title": "Steps",
"date": 1673523612554,
"points": 1.00,
"type": "gained"
},
{
"title": "Registration and activation on SWITCH ON",
"date": 1638890083370,
"points": 10.00,
"type": "gained"
},
{
"title": "Credit Card - Infinite",
"date": 1637013600000,
"points": 4.00,
"type": "gained"
}
]
},
{
"title": "redeemed",
"type": "redeemed",
"transaction": []
},
{
"title": "expired",
"type": "expired",
"transaction": []
}
]
}
}
Sample Error Response:
400 :
{
"status": {
"success": false,
"code": "400",
"reasonCode": "BadRequest",
"arabicMessage": "",
"englishMessage": "No records were found",
"backendError": "No records were found",
"backendCode": "-100"
}
}